//
//  UILabel+Category.h
//  FlowerTown
//
//  Created by lee on 2017/9/21.
//  Copyright © 2017年 TT. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef void(^CompelationBlock)(void);
@interface UILabel (Category)

+(instancetype)labelWithFont:(UIFont*)font textColor:(UIColor *)color;//创建label
-(void)addLineToLabelWithColor:(UIColor *)color;//添加打折扣线
//计算size
-(CGSize)sizeWithLabelText;//单行文字
-(CGSize)sizeWithLabelTextMaxSize:(CGSize)size;//多行文字
-(CGSize)sizeWithLabelAttributeTextMaxSize:(CGSize)size;//多行富文本


-(void)autoSizeFont;//根据内容自适应
-(void)autoSizeWithFontSize:(CGSize)size;
-(void)autoSizeAttributedWithFontSize:(CGSize)size;
+(UILabel*)hzLabelWithFrame:(CGRect)frame andText:(NSString*)text andFont:(UIFont*)font
           andTextAlignment:(NSTextAlignment)align andTextColor:(NSString*)txtColor andBgColor:(NSString*)bgColor;


- (void)startWithTime:(NSInteger)timeLine title:(NSString *)title compelationBlock:(CompelationBlock)compelation;//倒计时

@end
